package com.cin.cma.common.enums;

import lombok.Getter;

/**
 * @Author：wubo
 * @Date：2024/7/29 下午2:56
 */
@Getter
public enum SeatTypeEnum {
    NORMAL("NORMAL", "普通座"),
    LOVE("LOVE", "情侣座"),
    MASSAGE_CHAIR("MASSAGE_CHAIR", "按摩椅"),
    RESERVE("RESERVE", "保留座位"),
    DISABILITY("DISABILITY", "残疾⼈座位"),
    BOX("BOX", "包厢");
    private final String code;
    private final String name;

    SeatTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static SeatTypeEnum buildSeatTypeEnum(String code) {
        switch (code) {
            case "W":
                return DISABILITY;
            case "L":
            case "DL":
            case "R":
            case "DR":
            case "情侣":
            case "1":
            case "2":
            case "FMG2":
                return LOVE;
            case "H":
                return RESERVE;
            case "Z":
            case "按摩椅":
            case "FMG11":
                return MASSAGE_CHAIR;
            default:
                return NORMAL;
        }
    }
}
